//
//  testPickerViewController.m
//  ContactManager
//
//  Created by dyang26 on 11/9/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "testPickerViewController.h"


@implementation testPickerViewController

@synthesize imgPicker;

- (void)viewDidLoad {
	self.imgPicker = [[UIImagePickerController alloc] init];
	self.imgPicker.allowsImageEditing = YES;
	self.imgPicker.delegate = self;
    self.imgPicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
}

- (IBAction)grabImage {
	[self presentModalViewController:self.imgPicker animated:YES];
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {
	image.image = img;	
	[[picker parentViewController] dismissModalViewControllerAnimated:YES];
}

@end
